feat: add domain service pattern slice#409
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Test Results 12 files 12 suites 10m 0s ⏱️ Results for commit 969dfb6. ♻️ This comment has been updated with latest results. |
🔍 PR Validation ResultsVersion: `` ✅ Validation Steps
📊 ArtifactsDry-run artifacts have been uploaded and will be available for 7 days. This comment was automatically generated by the PR validation workflow. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #409 +/- ##
==========================================
+ Coverage 89.61% 95.68% +6.07%
==========================================
Files 539 543 +4
Lines 43432 43657 +225
Branches 6263 6297 +34
==========================================
+ Hits 38922 41775 +2853
+ Misses 2032 1882 -150
+ Partials 2478 0 -2478
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds the “Domain Service” domain-modeling slice to PatternKit’s production-readiness catalog, including runtime APIs, a source generator, an importable DI example, tests, benchmarks, and documentation updates to keep the catalog/coverage matrices consistent.
Changes:
- Introduces
DomainServiceOperation<TRequest,TResponse>andDomainServiceRegistry<TRequest,TResponse>runtime APIs plus TinyBDD coverage. - Adds
GenerateDomainServiceRegistry/DomainServiceOperationattributes and an incremental generator to emit registry factories from annotated methods. - Adds a Shipping Domain Service example (fluent + generated + DI), plus BenchmarkDotNet scenario and docs/catalog/TOC updates reflecting the new pattern counts.
Reviewed changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/PatternKit.Tests/Application/DomainServices/DomainServiceTests.cs | New TinyBDD tests covering runtime operation/registry behavior and validation. |
| test/PatternKit.Generators.Tests/DomainServiceRegistryGeneratorTests.cs | New Roslyn generator tests for emitted source and diagnostics. |
| test/PatternKit.Generators.Tests/AbstractionsAttributeCoverageTests.cs | Adds attribute coverage assertions for the new generator attributes. |
| test/PatternKit.Examples.Tests/ProductionReadiness/PatternKitPatternCatalogTests.cs | Updates expected pattern list and ApplicationArchitecture count. |
| test/PatternKit.Examples.Tests/ProductionReadiness/PatternKitBenchmarkCoverageTests.cs | Updates expected published route-result total to include the new pattern. |
| test/PatternKit.Examples.Tests/DomainServiceDemo/ShippingDomainServiceDemoTests.cs | New example tests validating fluent vs generated parity and DI import routes. |
| src/PatternKit.Generators/DomainServices/DomainServiceRegistryGenerator.cs | New incremental generator emitting domain service registry factory and diagnostics. |
| src/PatternKit.Generators/AnalyzerReleases.Unshipped.md | Registers new diagnostics IDs (PKDOM001–PKDOM004). |
| src/PatternKit.Generators.Abstractions/DomainServices/DomainServiceAttributes.cs | Adds generator attribute definitions for domain service registries/operations. |
| src/PatternKit.Examples/ProductionReadiness/PatternKitPatternCatalog.cs | Adds “Domain Service” to the production pattern catalog with coverage links. |
| src/PatternKit.Examples/ProductionReadiness/PatternKitExampleCatalog.cs | Adds “Shipping Domain Service Pattern” example descriptor. |
| src/PatternKit.Examples/DomainServiceDemo/ShippingDomainServiceDemo.cs | New shipping domain service demo (fluent + generated + IServiceCollection integration). |
| src/PatternKit.Examples/DependencyInjection/PatternKitExampleServiceCollectionExtensions.cs | Wires the new domain service example into AddPatternKitExamples(). |
| src/PatternKit.Core/Application/DomainServices/DomainService.cs | Adds the runtime domain service operation/registry implementation. |
| README.md | Updates pattern counts and benchmark matrix rows for Domain Service. |
| docs/patterns/toc.yml | Adds Domain Service to patterns TOC. |
| docs/patterns/application/domain-service.md | Adds the new pattern documentation page. |
| docs/index.md | Updates pattern counts and patterns table to include Domain Service. |
| docs/guides/pattern-coverage.md | Adds Domain Service to the coverage guide table. |
| docs/guides/benchmarks.md | Adds Domain Service rows to the benchmarks table. |
| docs/guides/benchmark-results.md | Updates benchmark results matrices/counts to include Domain Service and new generator. |
| docs/generators/toc.yml | Adds Domain Service generator to generators TOC. |
| docs/generators/domain-service.md | Adds generator documentation and diagnostic list. |
| docs/examples/toc.yml | Adds shipping domain service example to examples TOC. |
| docs/examples/shipping-domain-service-pattern.md | Adds the new shipping domain service example write-up. |
| benchmarks/PatternKit.Benchmarks/Application/DomainServiceBenchmarks.cs | Adds BenchmarkDotNet scenario for fluent vs generated registry construction/execution. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| sb.Append("partial ").Append(type.TypeKind == TypeKind.Struct ? "struct" : "class").Append(' ').Append(type.Name).AppendLine(); | ||
| sb.AppendLine("{"); | ||
| sb.Append(" public static global::PatternKit.Application.DomainServices.DomainServiceRegistry<") | ||
| .Append(requestType.ToDisplayString(TypeFormat)).Append(", ") | ||
| .Append(responseType.ToDisplayString(TypeFormat)).Append("> ") |
Code Coverage |
Adds the next domain modeling slice for #403: Domain Service.
Includes:
Local validation: